package com.sau.pixelcart.domain.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 订单核心信息（日均百万级数据需考虑分表）
 * </p>
 *
 * @author Inton
 * @since 2025-03-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("orders")
@ApiModel(value="Orders对象", description="订单核心信息（日均百万级数据需考虑分表）")
public class Orders implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单唯一标识")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "可读订单号（规则：YYYYMMDD+6位流水）")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "订单总额（含税含运费）")
    @TableField("price")
    private BigDecimal price;

    @ApiModelProperty(value = "精确到毫秒")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "关联用户表/员工表")
    @TableField("operator_id")
    private String operatorId;

    @TableField("status")
    private String status;

    @TableField("total_number")
    private int totalNumber;


}
